package com.study.eurekaclienthystrix.controller;

import com.study.eurekaclienthystrix.entity.User;
import com.study.eurekaclienthystrix.feign.EurekaClientTestFeign;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
public class Controller {

    @Resource
    EurekaClientTestFeign feign;

    @GetMapping("/testClient/get")
    public String get(){
        return feign.get();
    }

    @PostMapping("/testClient/post/{gender}")
    public String post(@PathVariable String gender, @RequestBody User user){
        return feign.post(gender, user);
    }

}
